package com.flyme.module.file.client.api;


import com.flyme.common.core.model.ResultBody;
import com.flyme.common.core.model.query.PagerInfo;
import com.flyme.module.file.client.entity.SysLive;
import org.springframework.web.bind.annotation.*;

import java.util.concurrent.Callable;

/**
 * @author zyf
 */
@RequestMapping("/live")
public interface SysLiveRemoteService {
    @RequestMapping("/auth")
    Object auth(@RequestParam("userid") String userid,String ts,String token);

    /**
     * 直播列表
     *
     * @return
     */
    @PostMapping("/list")
    ResultBody list(@ModelAttribute(value = "pagerInfo") PagerInfo pagerInfo, SysLive live);
    /**
     * 添加直播
     * @param live
     * @return
     */
    @PostMapping(value="/add")
    ResultBody add(@ModelAttribute(value = "live") SysLive live);
    /**
     * 根据ID查询直播详情
     * @param id
     * @return
     */
    @GetMapping(value = "/get/{id}")
    ResultBody get(@PathVariable String id);

    /**
     * 更新直播
     *
     * @param live
     * @return
     */
    @PostMapping("/edit")
    Callable<ResultBody> edit(@ModelAttribute(value = "live") SysLive live);
    /**
     * 删除直播
     *
     * @param id
     * @return
     */
    @PostMapping(value="/delByIds")
    ResultBody delByIds(@RequestParam("ids") Long[] ids);


    @PostMapping("/setLiveStatus")
    ResultBody setLiveStatus(@RequestParam("id") Long id, @RequestParam("liveStatus") Integer liveStatus);

    /**
     * 设置是否vip免费
     */
    @PostMapping("/setVipFree")
    ResultBody setVipFree(@RequestParam("id") Long id, @RequestParam("isVipFree") Integer isVipFree);
}
